import { Entity, PrimaryGeneratedColumn, Column } from "typeorm";
import { ManualTimestamp } from "../decorators/manual-timestamp.decorator";

@Entity("mount_base")
@ManualTimestamp()
export class MountBaseEntity {
  @PrimaryGeneratedColumn({ comment: "坐骑ID" })
  id!: number;

  @Column("varchar", { length: 100, comment: "坐骑名称" })
  name!: string;

  @Column("varchar", { length: 500, comment: "坐骑描述" })
  descr!: string;

  @Column("varchar", { length: 100, comment: "坐骑图片" })
  img!: string;

  @Column("int", { comment: "攻击力", default: -1000 })
  ap!: number;

  @Column("int", { comment: "初始攻击力", default: -1000 })
  apIni!: number;

  @Column("int", { comment: "生命值", default: -1000 })
  hp!: number;

  @Column("int", { comment: "初始生命值", default: -1000 })
  hpIni!: number;

  @Column("int", { comment: "法力值", default: -1000 })
  mp!: number;

  @Column("int", { comment: "初始法力值", default: -1000 })
  mpIni!: number;

  @Column("int", { comment: "速度", default: -1000 })
  sp!: number;

  @Column("int", { comment: "初始速度", default: -1000 })
  spIni!: number;

  @Column("tinyint", {
    comment: "坐骑类型：1-战马，2-名马，3-神马",
    default: 1 })
  type!: number;

  @Column("int", { comment: "坐骑价格", default: 1980 })
  price!: number;

  @Column("datetime", { name: "created_at", comment: "创建时间" })
  created_at!: Date;
@Column("datetime", { name: "updated_at", nullable: true, comment: "更新时间" })
  updated_at!: Date | null;
}
